package org.jackysoft.entity;

import javax.persistence.Entity;

@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
public class WebApplication extends AbstractEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6143657709317845067L;

	private boolean secure = true;
	private int port;
	private String context;
	private String domain;
	private String name;

	public WebApplication() {

	}

	public boolean isSecure() {
		return secure;
	}

	public void setSecure(boolean secure) {
		this.secure = secure;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	@Override
	public String toString(){
		return String.format("http%s://%s:%d/%s/", secure?"s":"",domain,port,context);
	}
}